//接口类型定义
// declare module "axios" {
//     interface AxiosRequestConfig {
//         showLoading?: boolean;
//         showError?: boolean;
//     }

// }
export interface Result<T = any> {
    code: number;
    data: T;
    msg: string;
}

//通用分类页翻货结果
export interface ResultData<T = any> {
    list: T[];
    page: {
        pageNum: number;
        pageSize: number;
        total: number | 0;
    };
}
export namespace Login {
    export interface params {
        userName: string;
        userPwd: string;
    }
}

export namespace User {
    export interface Params {
        userId?: number;
        userName?: string;
        state?: number;
    }
    export interface UserItem {
        createId: number;
        deptId: string;
        deptName: string;
        job: string;
        mobile: string;
        role: number;
        roleList: number;
        state: number;
        userEmail: string;
        userId: number;
        userImg: string;
        userName: string;
        _id: string;
    }
}

export namespace Dashboard {
    export interface ReportData {
        indicator: any;
        data: any;
        driverCount: number;
        totalMoney: number;
        orderCount: number;
        cityNum: number;
    }
    export interface LineData {
        label: string[];
        order: string[];
        money: string[];
    }
    export interface PieData {
        value: number;
        name: string;
    }
    export interface RadarData {
        indicator: Array<{ name: string; max: number }>;
        data: {
            name: string;
            value: number;
        };
    }
}

export namespace Pagination {
    export interface paginationProps {
        current: number;
        pageSize: number;
    }
    export interface pagination extends paginationProps {
        total?: number;
        showQuickJumper?: boolean;
        hideOnSinglePage?: boolean;
    }
    export interface TableProps<T = any> {
        loading: boolean;
        dataSource: Array<T>;
        onChange: any;
        pagination: pagination;
    }
    export interface useQueryTableProps {
        fetchPage: (params: paginationProps) => Promise<any>;
    }
    export interface paginationResult<T = any> {
        pageNo?: number | string;
        pageSize?: number;
        total?: number;
        data: Array<T>;
    }
}
